package com.example.chatzsyproject.view.AZListView.azlist;


import com.example.chatzsyproject.model.FriendModel;

import java.util.Comparator;

public class LettersComparator implements Comparator<AZItemEntity<FriendModel>> {

	public int compare(AZItemEntity<FriendModel> o1, AZItemEntity<FriendModel> o2) {
		if (o1.getSortLetters().equals("@")
			|| o2.getSortLetters().equals("#")) {
			return 1;
		} else if (o1.getSortLetters().equals("#")
				   || o2.getSortLetters().equals("@")) {
			return -1;
		} else {
			return o1.getSortLetters().compareTo(o2.getSortLetters());
		}
	}

}
